#include "maindialog.h"
#include "ui_maindialog.h"
#include "childdialog.h"
MainDialog::MainDialog(QWidget *parent)
    : QDialog(parent)
    , ui(new Ui::MainDialog)
{
    ui->setupUi(this);
}

MainDialog::~MainDialog()
{
    delete ui;
}

void MainDialog::on_enterBtn_clicked()
{
    //只是隐藏，当QT的a.exec()没有显示界面的时候会回收??是这样吗 是的
    close();
    //hide();
    ChildDialog childdialog;
    if(childdialog.exec()==Accepted){
        this->show();
    }else{
        return;
    }
}


